#!/bin/bash
go build -ldflags "-s -w"
if [ "$?" == "1" ];then
	echo "fail build"
	exit 1
fi
if [ -f "mousego.exe" ];then
	fn=mousego-win32-$(date "+%Y%m%d%H%M").zip
	echo Create : ${fn}
	zip -9 ${fn} mousego.exe zlib1.dll
fi
if [ "linux" == "$(go env GOOS)" ];then
	echo linux
else
	exit 0
fi
if [ -f "mousego" ];then
	fn=mousego-ubuntu2004-$(date "+%Y%m%d%H%M").gz
	echo Create : ${fn}
	gzip -9 -c mousego > ${fn}
fi
